#define _CRT_SECURE_NO_WARNINGS 1
int findMaxConsecutiveOnes(int* nums, int numsSize) {
    int sum = 0;
    int i = 0;
    int max = 0;
    for (i = 0; i < numsSize; i++)
    {
        if (nums[i] == 1)
        {
            sum++;
        }
        if (nums[i] == 0)
        {
            if (max <= sum)
            {
                max = sum;
            }
            sum = 0;
        }
    }
    if (max <= sum)
    {
        max = sum;
    }
    return max;
}
int main()
{
    int nums[] = { 1,1,0,1,1,1 };
    int x = sizeof(nums) / sizeof(nums[0]);
    findMaxConsecutiveOnes(nums, x);
    return 0;
}